1. Field of the Invention
This invention relates to the field of transmitting data between objects and data sources.
2. Background Art
Object-oriented programming is a method of creating computer programs by combining certain fundamental building blocks, and creating relationships among and between the building blocks. The building blocks in object-oriented programming systems are called "objects." An object is a programming unit that groups together a data structure (instance variables) and the operations (methods) that can use or affect that data. Thus, an object consists of data and one or more operations or procedures that can be performed on that data. The joining of data and operations into a unitary building block is called "encapsulation." In object-oriented programming, operations that can be performed on the data are referred to as "methods."
An object can be instructed to perform one of its methods when it receives a "message." A message is a command or instruction to the object to execute a certain method. It consists of a method selection (name) and arguments that are sent to an object. A message tells the receiving object what to do.
One advantage of object-oriented programming is the way in which methods are invoked. When a message is sent to an object, it is not necessary for the message to instruct the object how to perform a certain method. It is only necessary to request that the object execute the method. This greatly simplifies program development.
Object-oriented programming languages are generally based on one of two schemes for representing general concepts and sharing knowledge. One scheme is known as the "class" scheme. The other scheme is known as the "prototype" scheme. Both the class-based and prototype-based object-oriented programming schemes are generally described in Lieberman, "Using Prototypical Objects to Implement Shared Behavior in Object-Oriented Systems," OOPSLA 86 Proceedings, September 1986, pp. 214-223.
An object that describes behavior is called a "class." Objects that acquire a behavior and that have states are called "instances." Thus, in the objective C language, which is the computer language in which the preferred embodiment of the present invention may be implemented, a class is a particular type of object. In objective C, any object that is not a class object is said to be an instance of its class. The classes form a "hierarchy." Each subclass in the hierarchy may add to or modify the behavior of the object in question and may also add additional states.
One command that is often performed on an object is the loading of data into that object from a data source. This may occur when data from a database, for example, is to be loaded into one or more objects. In the prior art, data is loaded into an object by creating a link between the source of data and the destination of the data. This link is created by generating and compiling code. Code generation is required because the object must be able to interface with the data source and vice versa.
A disadvantage of the prior art code generation is the need to generate code for data loading. This creates source code management problems such as recompiling and redistributing.
Another disadvantage is that there must be a suitable interface for each object type and/or data source. The object may be defined such as to store data in a certain format, while the data source may store its data in a different format. There must be some translation of the format of the data of the data source into the format of the data of the object.